<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">产品详情</h3>
    </div>
    <div class="panel-body">
        <table class="table table-bordered">
            <tr><th>产品编号</th><td>{$row.item_no}</td></tr>
            <tr><th>订单号</th><td>{$row.allocation.order.order_no|default='-'}</td></tr>
            <tr><th>产品名称</th><td>{$row.allocation.model.product.name|default='-'}</td></tr>
            <tr><th>型号</th><td>{$row.allocation.model.name|default='-'}</td></tr>
            <tr><th>工序</th><td>{$row.allocation.process.name|default='-'}</td></tr>
            <tr><th>员工</th><td>{$row.allocation.user.nickname|default='-'}</td></tr>
            <tr><th>状态</th><td>{$row.status_text}</td></tr>
            <tr><th>报工时间</th><td>{$row.report.createtime|date='Y-m-d H:i',###|default='-'}</td></tr>
            <tr><th>审核人</th><td>{$row.audit_user.nickname|default='-'}</td></tr>
            <tr><th>审核时间</th><td>{$row.audit_time|date='Y-m-d H:i',###|default='-'}</td></tr>
        </table>
        
        <div class="row">
            <div class="col-md-6">
                <h4>报工图片</h4>
                <div class="image-gallery">
                    {volist name="reportImages" id="img"}
                        <div class="image-item" style="display:inline-block;text-align:center;margin:5px;">
                            <a href="{$img.image_url}" target="_blank">
                                <img src="{$img.image_url}" style="width:120px;height:120px;object-fit:cover;border-radius:4px;">
                            </a><br>
                            <small>{$img.upload_user.nickname|default='-'} - {$img.createtime|date='Y-m-d H:i',###}</small><br>
                            <a href="{:url('scanwork/product_item/delete_report_image', ['id'=>$img.id])}" 
                               onclick="return confirm('确定删除该图片？');" 
                               style="color:red;font-size:12px;">删除</a>
                        </div>
                    {/volist}
                    {empty name="reportImages"}
                        <p class="text-muted">暂无报工图片</p>
                    {/empty}
                </div>
            </div>
            
            <div class="col-md-6">
                <h4>审核图片</h4>
                <div class="image-gallery">
                    {volist name="auditImages" id="img"}
                        <div class="image-item" style="display:inline-block;text-align:center;margin:5px;">
                            <a href="{$img.image_url}" target="_blank">
                                <img src="{$img.image_url}" style="width:120px;height:120px;object-fit:cover;border-radius:4px;">
                            </a><br>
                            <small>{$img.upload_user.nickname|default='-'} - {$img.createtime|date='Y-m-d H:i',###}</small><br>
                            <span class="label label-{$img.audit_status==1?'success':'danger'}">{$img.audit_status_text}</span><br>
                            <a href="{:url('scanwork/product_item/delete_audit_image', ['id'=>$img.id])}" 
                               onclick="return confirm('确定删除该图片？');" 
                               style="color:red;font-size:12px;">删除</a>
                        </div>
                    {/volist}
                    {empty name="auditImages"}
                        <p class="text-muted">暂无审核图片</p>
                    {/empty}
                </div>
            </div>
        </div>
    </div>
</div>

<style>
.image-gallery {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
}
.image-item {
    transition: all 0.3s ease;
}
.image-item:hover {
    transform: scale(1.05);
}
</style> 